#!/bin/bash
redispath="/data/home/wf/redis/"
gdbpath="/data/home/xiaoq/dataset/gdb-gz/"
glibcpath="/data/home/xiaoq/dataset/glibc_restore/"
gccpath="/data/home/xiaoq/dataset/gcc-gz/"
vmapath="/data/home/xiaoq/dataset/vma/vma_tar/"
linuxpath="/data/home/xiaoq/dataset/linux/"
smalllinuxpath="/data/home/xiaoq/dataset/linux/smalllinux/"
rdbpath="/data/home/xiaoq/dataset/RDB_restore/smallrdb/"
vmdkpath="/data/home/xiaoq/dataset/vmdk-1-restore/smallvmdk/"
benchpath="/data/home/xiaoq/dataset/bench/"

echo "begin match 2 finesse 0.9" >> mylog_new2

echo "gcc" >> mylog_new2

path=$gccpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 2"
done
./destor -s >> mylog_new2
./rebuild

echo "linux" >> mylog_new2

path=$linuxpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 2"
done
./destor -s >> mylog_new2
./rebuild


echo "vma" >> mylog_new2

path=$vmapath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 2"
done
./destor -s >> mylog_new2
./rebuild


echo "vmdk" >> mylog_new2

path=$vmdkpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 2"
done
./destor -s >> mylog_new2
./rebuild


echo "end match 2 finesse 0.9" >> mylog_new2

echo "begin match 4 finesse 0.9" >> mylog_new2

echo "gcc" >> mylog_new2

path=$gccpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 4"
done
./destor -s >> mylog_new2
./rebuild

echo "linux" >> mylog_new2

path=$linuxpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 4"
done
./destor -s >> mylog_new2
./rebuild


echo "vma" >> mylog_new2

path=$vmapath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 4"
done
./destor -s >> mylog_new2
./rebuild


echo "vmdk" >> mylog_new2

path=$vmdkpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 4"
done
./destor -s >> mylog_new2
./rebuild


echo "end match 4 finesse 0.9" >> mylog_new2

echo "begin match 6 finesse 0.9" >> mylog_new2

echo "gcc" >> mylog_new2

path=$gccpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 6"
done
./destor -s >> mylog_new2
./rebuild

echo "linux" >> mylog_new2

path=$linuxpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 6"
done
./destor -s >> mylog_new2
./rebuild


echo "vma" >> mylog_new2

path=$vmapath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 6"
done
./destor -s >> mylog_new2
./rebuild


echo "vmdk" >> mylog_new2

path=$vmdkpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 6"
done
./destor -s >> mylog_new2
./rebuild


echo "end match 6 finesse 0.9" >> mylog_new2

echo "begin match 8 finesse 0.9" >> mylog_new2

echo "gcc" >> mylog_new2

path=$gccpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 8"
done
./destor -s >> mylog_new2
./rebuild

echo "linux" >> mylog_new2

path=$linuxpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 8"
done
./destor -s >> mylog_new2
./rebuild


echo "vma" >> mylog_new2

path=$vmapath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 8"
done
./destor -s >> mylog_new2
./rebuild


echo "vmdk" >> mylog_new2

path=$vmdkpath
for file in $(ls $path);do
    ./destor $path/$file -p"adjchunk_match_length 8"
done
./destor -s >> mylog_new2
./rebuild


echo "end match 8 finesse 0.9" >> mylog_new2